#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef double db;
typedef unsigned long long ull;
typedef long double ldb;

#define in read()
#define pii pair<int,int>
#define fi first
#define se second
#define FILE(x) freopen(x".in","r",stdin);\
	freopen(x".out","w",stdout);
#define pb push_back
#define vec vector<int>

int read(){int x = 0,sgn = 1;char ch = getchar();for(;!isdigit(ch);ch = getchar()) if(ch == '-') sgn = -1;for(;isdigit(ch);ch = getchar()) x = (x<<1)+(x<<3)+(ch^48);return x*sgn;}

const int N = 5e4+10;

db mid,c[N];
int a[N],b[N],h1,h2,t1,t2,q1[N],q2[N],L,n,k,R;

db calc1(){
	db res = -1e7; h1 = h2 = 1; t1 = t2 = 0;
	for(int i = 1;i < L;i++){
		while(h1 <= t1 && a[i] >= a[q1[t1]]) t1--;
		while(h2 <= t2 && a[i] <= a[q2[t2]]) t2--;
		q1[++t1] = q2[++t2] = i;
	}
	for(int i = L;i <= n;i++){
		while(h1 <= t1 && a[i] >= a[q1[t1]]) t1--;
		while(h2 <= t2 && a[i] <= a[q2[t2]]) t2--;
		q1[++t1] = q2[++t2] = i;
		while(h1 <= t1 && i - q1[h1] > L) h1++;
		while(h2 <= t2 && i - q2[h2] > L) h2++;
		res = max(res,(a[q1[h1]] - a[q2[h2]]) * 1. / (L + k));
	}return res;
}

bool calc2(){
	h1 = 1; t1 = 0; db res = -1e7;
	for(int i = 1;i <= n;i++) c[i] = a[i] + i * mid;
	for(int i = L;i <= n;i++){
		while(h1 <= t1 && c[i-L] >= c[q1[t1]]) t1--;
		q1[++t1] = i - L;
		while(h1 <= t1 && i - q1[h1] > R) h1++;
		res = max(res,c[q1[h1]] - c[i]);
	}
	h1 = 1; t1 = 0;
	for(int i = 1;i <= n;i++) c[i] = a[i] - i * mid;
	for(int i = n - L;i >= 1;i--){
		while(h1 <= t1 && c[i + L] >= c[q1[t1]]) t1--;
		q1[++t1] = i + L;
		while(h1 <= t1 && q1[h1] - i > R) h1++;
		res = max(res,c[q1[h1]] - c[i]);
	}return res >= k * mid;
}

void solve(){
	n = in,k = in,L = in,R = in; L--; R--; for(int i = 1;i <= n;i++) a[i] = in;
	db l = 0,r = 1e4,ans1 = calc1();
	for(int i = 1;i <= 50;i++){
		mid = (l + r) / 2;
		if(calc2()) l = mid; else r = mid;
	}
	printf("%.4lf\n",max(ans1,mid));
}

int main (){
#ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
#endif
	for(int test = in;test;test--) solve();
	return 0;
}
